package com.hellobike.haxing.modules.operate.entity;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hellobike.haxing.modules.operate.mapper.typehandler.JSONArrayHandler;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: t_operate_cms_page_component
 * @Author: haxing-boot
 * @Date: 2020-02-10
 * @Version: V1.0
 */
@Data
@TableName("t_operate_cms_page_component")
public class OperateCmsPageComponent implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 组件id
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 页面id
     */
    @Excel(name = "页面id", width = 15)
    private Long pageId;
    /**
     * 组件类型 1-图片 2-优惠券 3-商品
     */
    @Excel(name = "组件类型 1-图片 2-优惠券 3-商品", width = 15)
    private Integer componentType;
    /**
     * 组件样式 0-无 1-一行一 2-一行二
     */
    @Excel(name = "组件样式 0-无 1-一行一 2-一行二", width = 15)
    private Integer componentStyle;
    /**
     * 组件排序 升序
     */
    @Excel(name = "组件排序 升序", width = 15)
    private Integer componentSort;
    /**
     * 组件内容信息json
     */
    @Excel(name = "组件内容信息json", width = 15)
    @TableField(typeHandler = JSONArrayHandler.class)
    private JSONArray componentInfoJsonb;

    /**
     * 是否删除 0-生效 1-删除
     */
    @Excel(name = "是否删除 0-生效 1-删除", width = 15)
    @TableLogic
    private Integer deleted;

    /**
     * 创建时间
     */
    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 更新时间
     */
    @Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    /**
     * 创建人
     */
    @Excel(name = "创建人", width = 15)
    private Integer createBy;
    /**
     * 修改人
     */
    @Excel(name = "修改人", width = 15)
    private Integer updateBy;
}
